﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DiemChapNhanThe.Entities;
using DiemChapNhanThe.Data;

public partial class Controls_ControlDoanhNghiepVangContent : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Bind_Data();
        }
    }
    protected void Bind_Data()
    {
        int ToTalRows = 0;
        string WhereClause = "1=1";
        WhereClause += " and TrangThai = 1";
        TList<MatHang> Tlist_MatHang = DataRepository.MatHangProvider.GetPaged(WhereClause, "NgayCapNhat DESC", 0, 15, out ToTalRows);
        dlDoanhNghiepVang.DataSource = Tlist_MatHang;
        dlDoanhNghiepVang.DataBind();
    }
    public string GetTieuDe(object Char)
    {
        string s = Char.ToString();
        return Common.ConvertToUnSign(s);
    }
    public string GetLoaiCongTy(object Id)
    {
        int s = Convert.ToInt32(Id.ToString());
        LoaiCongTy ent_LoaiCongTy = DataRepository.LoaiCongTyProvider.GetById(s);
        return ent_LoaiCongTy.TenLoaiCongTy;
    }
}